<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    /* 测试题
    
     */
    new Promise(((resolve, reject) => {
        console.log(1)
        resolve('ok')
    })).then(() => {
        console.log(2)
    }).catch(()=>{
        console.log(0)
    })
    console.log(3)

    async function f1() {
        await f2();
        console.log(4)
        await f3()
    }

    async function f2() {
        console.log(5)
    }

    async function f3() {
        console.log(6)
    }

    f1();
    setTimeout(async () => {
        console.log(7)
        await f2()
        console.log(8)
    }, 0)
    setTimeout(() => {
        console.log(9)
    }, 0)

    console.log(10);
    
</script>
</body>
</html>